package viewIHM;

import java.awt.event.ActionEvent;

import javax.swing.AbstractAction;

public class OpenAction extends AbstractAction{

	private static final long serialVersionUID = 1L;
	private ChatGUIView fenetre ;

	public OpenAction(ChatGUIView fenetre,String nomAction){
		super(nomAction);
		this.fenetre = fenetre ;
	}
	
	public void actionPerformed(ActionEvent arg0) {
		if (!fenetre.getPeople().contains(fenetre.getUserSelect()))
			fenetre.addTab();
	}

}
